/*
 * @lc app=leetcode.cn id=283 lang=csharp
 *
 * [283] 移动零
 */

// @lc code=start
public class Solution {
    public void MoveZeroes(int[] nums) {
        var length = nums.Length;
        var leftZeroIx = 0;
        for(int i = 0; i < length; ++i)
        {
            if(nums[i] != 0)
            {
                var tmp = nums[i];
                nums[i] = nums[leftZeroIx];
                nums[leftZeroIx] = tmp;
                ++leftZeroIx;
            }
        }
    
    }
}
// @lc code=end

